package com.lg.atp.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

//@Configuration
public class StaticResourceConfig extends WebMvcConfigurationSupport {

	private @Value("${attachmentUrl}") String attachmentUrl;
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
       registry.addResourceHandler("/rimg/**").addResourceLocations("file:"+attachmentUrl);
        super.addResourceHandlers(registry);
    }

}
